<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h4>Status: ${error}</h4>
	
	<form action="crudPermission.do" method="post">
	<table>
		<tr>
			<td>
				ID
			</td>
			
			<td>
				<input type="text" name="txtId" value="${entityPermission.id}" readonly="readonly"/>
			</td>
		</tr>
		
		<tr>
			<td>
				Page
			</td>
			
			<td>
				<input type="text" name="txtPage" value="${entityPermission.page}"/>
			</td>
		</tr>
		
		<tr>
			<td>
				Disable
			</td>
			
			<td>
				<input type="text" name="txtDisable" value="${entityPermission.disable}"/>
			</td>
		</tr>
		
		<tr>
			<td colspan="2">
				<input type="submit" name="btnCreate" value="Create">
				<input type="submit" name="btnUpdate" value="Update">
				<input type="submit" name="btnDelete" value="Delete">
				<input type="submit" name="btnRefresh" value="Refresh"> 
			</td>
		</tr>
	</table>
	</form>
	
	<h4>Danh sách các quyền đã được thiết lập</h4>
	
	<table border="1" width="100%">
	<tr bgcolor="lightgray">
		<td>Id</td>
		<td>Page</td>
		<td>Disable</td>
		<td>&nbsp;</td>
	</tr>
	
	
	<c:forEach var="c" items="${showPermission}">
	<tr>
		<td>${c.id}</td>
		<td>${c.page}</td>
		<td>${c.disable}</td>
		
		<td><a href="crudCategory.do?permissionId=${c.id}">Chi tiết</a></td>
	</tr>
	</c:forEach>
	</table>
</body>
</html>